package com.ruoyi.iot.mapper;

import com.ruoyi.iot.dto.Dust;
import com.ruoyi.iot.vo.DustVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.Instant;
import java.util.List;

@Mapper
public interface DustMapper {

    List<DustVO> get(@Param("sensorId") String sensorId, @Param("startTime") Instant startTime, @Param("endTime") Instant endTime);

    DustVO getNew(@Param("sensorId") String sensorId);

    List<DustVO> getRange(@Param("sensorId") String sensorId,
                          @Param("targetPoints") Integer targetPoints,
                          @Param("startTime") Instant startTime,
                          @Param("endTime") Instant endTime);

    void batchInsertDustData(List<Dust> weatherList);

    void updateStatus(@Param("sensorIds") List<String> sensorIds, @Param("runningStatus") Integer runningStatus);

    List<String> getOfflineDeviceIds();
}
